package com.tedu.service;

import com.tedu.mappers.RightsMapper;
import com.tedu.pojo.Rights;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Author：毕龙
 * Date: 2022/9/16 8:48
 */
@Service
public class RightserviceImpl implements RightsService{

    @Autowired
    private RightsMapper rightsMapper;

    /**
     * 业务分析 获取1-2级的菜单信息
     *  一级菜单 parent_id = 0
     *  二级菜单 parent_id = 一级id
     *  将二级菜单数据封装到一级的children
     *
     * @return
     */

    @Override
    public List<Rights> getRightsList() {
        return rightsMapper.getRightsList();
    }
}
